package com.seven.first.suite.base;

import io.swagger.annotations.ApiModelProperty;

public abstract class QueryDTO {

    /**
     * 排序的字段
     * 例如：username desc,password asc
     */
    @ApiModelProperty(value = "排序条件", dataType = "String", example = "username desc,password asc")
    private String sortColumns;

    @ApiModelProperty(value = "排序方向 true/null：正序，false：倒序", dataType = "Boolean")
    private Boolean sortDirect;

    public static final int DEFAULT_PAGE_NUMBER = 1;

    public static final int DEFAULT_PAGE_SIZE = 10;


    @ApiModelProperty(value = "页号", dataType = "int", notes = "首页从1开始")
    /** 页数  */
    private int pageNum = DEFAULT_PAGE_NUMBER;

    @ApiModelProperty(value = "页码", dataType = "int", notes = "默认一页显示10个数据")
    /** 分页大小 */
    private int pageSize = DEFAULT_PAGE_SIZE;


    public String getSortColumns() {
        return sortColumns;
    }

    public void setSortColumns(String sortColumns) {
        this.sortColumns = sortColumns;
    }


    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public Boolean getSortDirect() {
        return sortDirect;
    }

    public void setSortDirect(Boolean sortDirect) {
        this.sortDirect = sortDirect;
    }
}
